package mr.ali.videoapp.portal.controller;


import com.github.pagehelper.PageInfo;
import mr.ali.videoapp.portal.model.CollectionComment;
import mr.ali.videoapp.portal.service.ICollectionCommentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Mr-ali
 * @since 2025-06-01
 */
@RestController
@RequestMapping("/portal/collectionComment")
public class CollectionCommentController {
    @Resource
    private ICollectionCommentService collectionCommentService;

    @GetMapping("/list")
    public PageInfo<CollectionComment> getCollectionCommentList(Integer pageNum, Integer pageSize, Integer videoId) {
        return collectionCommentService.getCollectionCommentList(pageNum, pageSize, videoId);
    }

    @GetMapping("/insert")
    public CollectionComment insertComment(CollectionComment collectionComment) {
        return collectionCommentService.insertComment(collectionComment);
    }
}
